# name = 1
# print('名字是:%s'%name)
# print('名字是{0}'.format(name))

# msg = "我今天%s岁了，但是我的年薪是%d万" % ("22",1)
# print(msg)
# print(f"我是{name},我{msg}")

print("字符串在python中的类型名称是：%s，字符串str长度：%d" % (type("str"),len("str")))
# name = "zhangsan" + "lisi"
# print(f"我的名字是：{name}")
#
# print("限制5位数，保留2位小数：%10.2f" % (22222.2222))
# print("限制5位数，保留2位小数：%.2f" % (22222.2222))

# print("1+1=",1+1,sep="")
# print("1-1=",1-1)
# print("1*2=",1*2)
# print("5/2=",5/2) # 除
# print("5//2=",5//2) # 去整除
# print("5%2=",5%2) # 模
# print("5**2=",5**2) # 5的2次方
for x in range(5):
    print(x, end=" ")
print()
for x in range(2,5):
    print(x, end=" ")
print()
for x in range(2,8,2):
    print(x, end=" ")
print()

for str in "what's you name":
    print(str,end="")
print()

# 99乘法表
for x in range(1,10):
    for z in range(1,x+1):
        print(f"{z}*{x}={x*z}",end="\t")
    print()